home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / human interface toolbox / htmlsample / sampleutils.h < prev   
Encoding:
C/C++ Source or Header  |  2000-06-23  |  2.6 KB  |  69 lines

  1. /*
  2.     file SampleUtils.h
  3.     
  4.     Description:
  5.     This file contains routine prototypes that can be used to access
  6.     routines defined in SampleUtils.c.  These routines have been moved
  7.     here to a separate file to simplify the example.
  8.     
  9.     HTMLSample is an application illustrating how to use the new
  10.     HTMLRenderingLib services found in Mac OS 9. HTMLRenderingLib
  11.     is Apple's light-weight HTML rendering engine capable of
  12.     displaying HTML files.
  13.  
  14.     by John Montbriand, 1999.
  15.  
  16.     Copyright: © 1999 by Apple Computer, Inc.
  17.     all rights reserved.
  18.     
  19.     Disclaimer:
  20.     You may incorporate this sample code into your applications without
  21.     restriction, though the sample code has been provided "AS IS" and the
  22.     responsibility for its operation is 100% yours.  However, what you are
  23.     not permitted to do is to redistribute the source as "DSC Sample Code"
  24.     after having made changes. If you're going to re-distribute the source,
  25.     we require that you make it clear in the source that the code was
  26.     descended from Apple Sample Code, but that you've made changes.
  27.     
  28.     Change History (most recent first):
  29.     10/16/99 created by John Montbriand
  30. */
  31.  
  32. #ifndef __SAMPLEUTILS__
  33. #define __SAMPLEUTILS__
  34.  
  35. #include <Types.h>
  36. #include <Windows.h>
  37.  
  38. /* GetApplicationFolder returns the volume reference number and
  39.     directory id of the folder containing the application. */
  40. OSStatus GetApplicationFolder(FSSpec *spec);
  41.  
  42. /* GetApplicationFolder returns a URL referring to the folder
  43.     containing the application.  If successful, *url is set
  44.     to a new handle containing the URL.  It is the caller's
  45.     responsibility to dispose of this handle. */
  46. OSStatus GetApplicationFolderURL(Handle *url);
  47.  
  48. /* DrawGrowIconWithoutScrollLines draws the grow icon in the bottom
  49.     right corner of the frontmost window without drawing the scroll bar
  50.     lines.  It does this by setting the clip region to the bottom right corner
  51.     before calling DrawGrowIcon. */
  52. void DrawGrowIconWithoutScrollLines(WindowPtr window);
  53.  
  54. /* SetWindowStandardStateSize sets the window's standard state rectangle
  55.     to a rectangle of the size suggested in the width and height parameters.
  56.     In the end, it may set the standard size to something smaller than the
  57.     width and height parameters so the entire window remains visible.  The
  58.     standard rectangle is also centered on the main screen.  The window's
  59.     standard state rectangle is used by ZoomWindow whenever when it
  60.     is called with the inZoomOut partcode. */
  61. void SetWindowStandardStateSize(WindowPtr window, short width, short height);
  62.  
  63. /* GrayOutBox grays out an area of the screen in the current grafport.  
  64.     *theBox is in local coordinates in the current grafport. This routine
  65.     is for direct screen drawing only.  */
  66. void GrayOutBox(Rect *theBox);
  67.  
  68. #endif
  69.